import unittest
import unittestreport
import apitest.reportor as reportor

suite = unittest.TestSuite()
# suite.addTest(unittest.TestLoader().discover(r'E:\codes\python\ApiTestPlatform\testcase\user'))
# suite.addTest(unittest.TestLoader().discover(r'testcase/user'))
suite.addTest(unittest.TestLoader().discover(r'lxhc_testcase/user'))
suite.addTest(unittest.TestLoader().discover(r'lxhc_testcase/home'))
# print(suite)

# runer = unittest.TextTestRunner(stream=open('report.txt','w',encoding='utf8'))
# runer.run(suite)

feishu_secret = "vIQKUT0PsvwsdOUsCIovne"
feishu_url = "https://open.feishu.cn/open-apis/bot/v2/hook/9823e02a-12b9-43cf-90eb-f1eca9f905a7"
ding_url = "https://oapi.dingtalk.com/robot/send?access_token=8ec631f31c3b2593ed169a40d94ee79f1935984ab6e99a96ae07875f063f2539"
runer = reportor.TestRunner(suite, title='乐享慧采接口自动化报告', desc="乐享慧采接口自动化报告", tester="AutoTester", templates=2)
runer.feishu_notice(url=feishu_url)
#.feishu_notice(url=feishu_url)

